\(\int \frac {\cos (x) \sin (x)}{x^2} \, dx\) [11]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 8, antiderivative size = 16 \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=\operatorname {CosIntegral}(2 x)-\frac {\sin (2 x)}{2 x} \]

[Out]

Ci(2*x)-1/2*sin(2*x)/x

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4491, 12, 3378, 3383} \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=\operatorname {CosIntegral}(2 x)-\frac {\sin (2 x)}{2 x} \]

[In]

Int[(Cos[x]*Sin[x])/x^2,x]

[Out]

CosIntegral[2*x] - Sin[2*x]/(2*x)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 4491

Int[Cos[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d_.)*(x_))^(m_.)*Sin[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Int[E
xpandTrigReduce[(c + d*x)^m, Sin[a + b*x]^n*Cos[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[n, 0]
&& IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {\sin (2 x)}{2 x^2} \, dx \\ & = \frac {1}{2} \int \frac {\sin (2 x)}{x^2} \, dx \\ & = -\frac {\sin (2 x)}{2 x}+\int \frac {\cos (2 x)}{x} \, dx \\ & = \operatorname {CosIntegral}(2 x)-\frac {\sin (2 x)}{2 x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=\operatorname {CosIntegral}(2 x)-\frac {\sin (2 x)}{2 x} \]

[In]

Integrate[(Cos[x]*Sin[x])/x^2,x]

[Out]

CosIntegral[2*x] - Sin[2*x]/(2*x)

Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94

method result size
default \(\operatorname {Ci}\left (2 x \right )-\frac {\sin \left (2 x \right )}{2 x}\) \(15\)
risch \(\operatorname {Ci}\left (2 x \right )-\frac {i \pi \,\operatorname {csgn}\left (i x \right ) \operatorname {csgn}\left (x \right )}{2}+\frac {i \operatorname {csgn}\left (i x \right ) \pi }{2}-\frac {\sin \left (2 x \right )}{2 x}\) \(35\)
meijerg \(\frac {\sqrt {\pi }\, \left (\frac {4}{\sqrt {\pi }}-\frac {4 \gamma }{\sqrt {\pi }}-\frac {4 \ln \left (2\right )}{\sqrt {\pi }}-\frac {4 \ln \left (x \right )}{\sqrt {\pi }}-\frac {2 \sin \left (2 x \right )}{\sqrt {\pi }\, x}+\frac {4 \,\operatorname {Ci}\left (2 x \right )}{\sqrt {\pi }}+\frac {4 \gamma -4+4 \ln \left (2\right )+4 \ln \left (x \right )}{\sqrt {\pi }}\right )}{4}\) \(71\)

[In]

int(cos(x)*sin(x)/x^2,x,method=_RETURNVERBOSE)

[Out]

Ci(2*x)-1/2*sin(2*x)/x

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06 \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=\frac {x \operatorname {Ci}\left (2 \, x\right ) - \cos \left (x\right ) \sin \left (x\right )}{x} \]

[In]

integrate(cos(x)*sin(x)/x^2,x, algorithm="fricas")

[Out]

(x*cos_integral(2*x) - cos(x)*sin(x))/x

Sympy [A] (verification not implemented)

Time = 1.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.38 \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=- \log {\left (x \right )} + \frac {\log {\left (x^{2} \right )}}{2} + \operatorname {Ci}{\left (2 x \right )} - \frac {\sin {\left (2 x \right )}}{2 x} \]

[In]

integrate(cos(x)*sin(x)/x**2,x)

[Out]

-log(x) + log(x**2)/2 + Ci(2*x) - sin(2*x)/(2*x)

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.25 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.94 \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=\frac {1}{2} \, \Gamma \left (-1, 2 i \, x\right ) + \frac {1}{2} \, \Gamma \left (-1, -2 i \, x\right ) \]

[In]

integrate(cos(x)*sin(x)/x^2,x, algorithm="maxima")

[Out]

1/2*gamma(-1, 2*I*x) + 1/2*gamma(-1, -2*I*x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.19 \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=\frac {2 \, x \operatorname {Ci}\left (2 \, x\right ) - \sin \left (2 \, x\right )}{2 \, x} \]

[In]

integrate(cos(x)*sin(x)/x^2,x, algorithm="giac")

[Out]

1/2*(2*x*cos_integral(2*x) - sin(2*x))/x

Mupad [F(-1)]

Timed out. \[ \int \frac {\cos (x) \sin (x)}{x^2} \, dx=\int \frac {\cos \left (x\right )\,\sin \left (x\right )}{x^2} \,d x \]

[In]

int((cos(x)*sin(x))/x^2,x)

[Out]

int((cos(x)*sin(x))/x^2, x)